Skip to content

packaging: build and bundle UI using npm in deb and rpm packages#4605

Merged
yadvr merged 11 commits intoapache:4.15from
shapeblue:new-ui-pkg
Jan 28, 2021
Merged

packaging: build and bundle UI using npm in deb and rpm packages#4605
yadvr merged 11 commits intoapache:4.15from
shapeblue:new-ui-pkg

Conversation

@yadvr
Copy link
Member

@yadvr yadvr commented Jan 20, 2021

This changes deb and rpm packaging to build the UI using npm and bundle
it in the cloudstack-management package and a new cloudstack-ui
package. The cloudstack-ui package will install the UI under
/usr/share/cloudstack-ui/. For both packages the config.json will not
be overridden on upgrade.

This changes deb and rpm packaging to build the UI using npm and bundle
it in the `cloudstack-management` package and a new `cloudstack-ui`
package. The `cloudstack-ui` package will install the UI under
`/usr/share/cloudstack-ui/`. For both packages the config.json will not
be overridden on upgrade.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Member Author

yadvr commented Jan 20, 2021

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2558

@yadvr
Copy link
Member Author

yadvr commented Jan 20, 2021

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@yadvr
Copy link
Member Author

yadvr commented Jan 20, 2021

Packages screenshot for file confirmation:
Screenshot_20210120-231725
Screenshot_20210120-231750


# cloudstack-ui
mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-ui
cd ui && npm install && npm run build && cd ..
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that npn is available on the system. However, that's not a guarantee.

The .deb (and .rpm) should have a build depends on 'npm'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that adds a dependency much like jdk or mvn. I've added nodejs-12 (lts) in the container images that are used to build packages by blueorangutan. https://hub.docker.com/u/bhaisaab

Copy link
Member Author

@yadvr yadvr Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that nodejs may not be available in default/main repo of the distros. Should we document it on docs and install.md?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhtyd this looks like a good point to be documented indeed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that nodejs may not be available in default/main repo of the distros. Should we document it on docs and install.md?

No, we should require it in the .spec and control file as a hard requirement. The build will fail without those, so it shouldn't even start to build.

The control and .spec file should exactly specify what is needed to build the packages. Without those dependencies the build should not initiate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, but that won't be satisfied automatically chances are somebody will install older version of nodejs.

@blueorangutan
Copy link

Trillian test result (tid-3403)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41304 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4605-t3403-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Smoke tests completed. 85 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_deploy_and_upgrade_kubernetes_cluster Failure 123.82 test_kubernetes_clusters.py

yadvr added 2 commits January 21, 2021 17:53
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Member Author

yadvr commented Jan 21, 2021

@wido @GabrielBrascher doc PR raised here: apache/cloudstack-documentation#182 and I've updated INSTALL.md in this PR
@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✖debian. JID-2567

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Member Author

yadvr commented Jan 21, 2021

@blueorangutan package

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Member Author

yadvr commented Jan 21, 2021

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Member Author

yadvr commented Jan 21, 2021

@blueorangutan package

@yadvr
Copy link
Member Author

yadvr commented Jan 23, 2021

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✖debian. JID-2575

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Member Author

yadvr commented Jan 25, 2021

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@yadvr
Copy link
Member Author

yadvr commented Jan 25, 2021

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2589

@yadvr
Copy link
Member Author

yadvr commented Jan 27, 2021

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@yadvr
Copy link
Member Author

yadvr commented Jan 27, 2021

@weizhouapache I've build/scp-ed the packages here if you want to review/test http://download.cloudstack.org/testing/pr-4605/

@weizhouapache
Copy link
Member

@weizhouapache I've build/scp-ed the packages here if you want to review/test http://download.cloudstack.org/testing/pr-4605/

@rhtyd thanks, I will test it.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@Pearl1594
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Member Author

yadvr commented Jan 27, 2021

Aborted previous build job, kicking new one
@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@weizhouapache
Copy link
Member

@weizhouapache I've build/scp-ed the packages here if you want to review/test http://download.cloudstack.org/testing/pr-4605/

@rhtyd thanks, I will test it.

@rhtyd
waiting for new packages on http://download.cloudstack.org/testing/pr-4605/debian/

Not Found
The requested URL was not found on this server.

Apache/2.4.18 (Ubuntu) Server at download.cloudstack.org Port 80

@blueorangutan
Copy link

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2602

@yadvr
Copy link
Member Author

yadvr commented Jan 27, 2021

@weizhouapache yes the pkgs just got rebuilt, I'll sync in next 15mins and ping you.

@yadvr
Copy link
Member Author

yadvr commented Jan 27, 2021

Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. LGTM

@yadvr
Copy link
Member Author

yadvr commented Jan 28, 2021

@weizhouapache we've two LGTMs, are you testing this? Thanks.

@weizhouapache
Copy link
Member

@weizhouapache we've two LGTMs, are you testing this? Thanks.

@rhtyd yes, tested ok. reviewing code. I will get back to you in 30 min.

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

tested ok on ubuntu.

the only concern is, primate ui is shipped with cloudstack-management as well. if cloudstack-management and cloudstack-ui are both installed, the following two folder have same code.

/usr/share/cloudstack-management/webapp
/usr/share/cloudstack-ui

They use same config /etc/cloudstack/ui/config.json, I think it is not a major issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants